#include "oled_task.h"

void Oled_task(void const * argument)
{
    oled_init();
	oled_clear();
    while (1)
    {
        if(nrf_found_flag==0){
            oled_blit_str(0,0,(uint8_t *)"recv device not found");
			oled_update();
			oled_clear();
        }
        else{
            oled_blit_str(0,0,(uint8_t *)"received:");
            oled_blit_str(0,8,(uint8_t *)"pitch:");
            oled_blit_str(0,16,(uint8_t *)"roll:");
            oled_blit_str(0,24,(uint8_t *)"yaw:");
            oled_blit_num(42,8,pitch,3);
            oled_blit_num(42,16,roll,3);
            oled_blit_num(42,24,yaw,3);
            oled_update();
            oled_clear();
        }
        osDelay(1);
    }
    
}
